import { instance } from "../utils/request";
const getInfosPagination = async (params) => {
	return await instance.get("/Infos/Pagination", params);
};

const addInfos = async (data) => {
	return await instance.post("/Infos/Add", data);
};

const updateInfos = async (data) => {
	return await instance.post("/Infos/Update", data);
};

const getInfosDetail = async (id) => {
	return await instance.get("/Infos/Detail", { id : id });
};

const deleteInfos = async (id) => {
	return await instance.post("/Infos/Delete", { id : id });
};

const infosApi = {
	getInfosPagination,
	addInfos,
	updateInfos,
	getInfosDetail,
	deleteInfos,
};

export default infosApi
